package com.ruoyi.oss.ienum;

import com.ruoyi.oss.config.properties.OssProperties;
import com.ruoyi.oss.service.CloudOssService;
import com.ruoyi.oss.service.impl.AliYunCloudOssServiceImpl;
import com.ruoyi.oss.service.impl.MinioCloudOssServiceImpl;
import com.ruoyi.oss.service.impl.QCloudOssCloudServiceImpl;
import lombok.Getter;

import java.util.function.Function;

/**
 * oss服务商类型
 *
 * @author xueyu
 */
@Getter
public enum OssType {

    /**
     * 阿里云
     */
    ALIYUN(AliYunCloudOssServiceImpl::new),
    /**
     * 腾讯云
     */
    QCLOUD(QCloudOssCloudServiceImpl::new),
    /**
     * minio
     */
    MINIO(MinioCloudOssServiceImpl::new);


    private final Function<OssProperties, CloudOssService> services;

    OssType(Function<OssProperties, CloudOssService> services) {
        this.services = services;
    }

}
